<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/taglib.jsp" %>
<hs:message />

<input name="id" type="hidden" value="${book.id}" />
<p>
	<label>书名：</label>
	<input name="bookName" type="text" value="${book.bookName}" /><br/>
</p>
<p>
	<label>类别：</label>
	<select name="bookPartId">
		<c:forEach var="bookPart" items="${bookParts}">
			<c:choose>
				<c:when test="${book.bookPartId eq bookPart.id}">
					<option value="${bookPart.id}" selected="selected">${bookPart.partName}</option>
				</c:when>
				<c:otherwise>
					<option value="${bookPart.id}">${bookPart.partName}</option>
				</c:otherwise>
			</c:choose>
		</c:forEach>
	</select>
</p>
<p>
	<label>简介：</label>
	<textarea id="intro" name="intro" cols="10" rows="5">${book.intro}</textarea>
</p>
<p>
	<label>出版时间：</label>
	<fmt:formatDate var="publicationDate" value="${book.publicationDate}" pattern="yyyy-MM-dd" />
	<input name="publicationDate" type="text" class="datepicker" value="${publicationDate}" />
</p>
<p>
	<label>出版社网址：</label>
	<input name="publishingHouseUrl" type="text" value="${book.publishingHouseUrl}" />
</p>
<p>
	<label>封面：</label>
	<input name="frontCover" type="text" value="${book.frontCover}" class="hs-upload" uploadmodel="multi" />
	
</p>
<p>
	<label>单价：</label>
	<input name="price" type="text" value="${book.price}" />
<p>
	<label>库存：</label>
	<input name="stores" type="text" value="${book.stores}" />
</p>
<p>
	<label>&nbsp;</label>
	<input type="submit" value="保存" class="hs-toolbar-button hs-icon-save" />
	<input type="button" value="取消" class="hs-fn-back hs-toolbar-button" />
</p>
<hs:validator className="org.projectname.entity.book.Book" />
<script type="text/javascript">
	//补充验证
// 	$(function(){
// 		$("#intro").rules("add", {
// 			notBlank:true
// 		});
// 	});
</script>